import 'package:vischat/core/constants/storage_constants.dart';
import 'package:vischat/core/service/storage/base_secure_storage.dart';

/// 加密存储会话列表
class SecureConversationStorage extends BaseSecureStorage {
  SecureConversationStorage()
    : super(
        boxName: 'encrypted_conv_storage',
        encryptionKeyName: 'hive_conv_key',
      );

  Future<void> saveConversations(String conversations) async {
    await saveData(StorageConstants.conversations, conversations);
  }

  String getConversations() {
    final data = getData(StorageConstants.conversations, defaultValue: '');
    return data;
  }
}
